//
//  SEGMarketDetailViewModel.h
//  Commom
//
//  Created by Clavis on 2019/7/29.
//

#import <Foundation/Foundation.h>

#if __has_include(<Commom/SEGText.h>)
#import <Commom/SEGText.h>
#else
#import "SEGText.h"
#endif

typedef NS_ENUM(NSUInteger, SEGEnumMarketDetailViewType) {
    SEGEnumMarketDetailViewType_NO = 0, /*默认*/
};

#define kMarketDetailViewHeight 35     // MarketDetailView的高度
#define labelPadding    7
#define picTopPadding   8
#define picWidth        93.5
#define picPadding      10.0

@interface SEGMarketDetailViewModel : NSObject
@property (nonatomic, copy) NSString *title; // 集市标题
@property (nonatomic, copy) NSString *content; // 集市内容
@property (nonatomic, copy) NSString *price; // 价格
@property (nonatomic, strong) NSArray *imageContent; // 图片数组
@property (nonatomic, copy) NSString *isChange; // 是否可交换
@property (nonatomic, assign) CGFloat widgetWidth; //控件总宽度
@property (nonatomic, assign) BOOL isGift; // 是否为赠送

@end

@interface SEGMarketDetailViewLayout : NSObject
@property (nonatomic, assign,readonly) CGFloat totalHeight;//控件总高度
@property (nonatomic, assign,readonly) SEGEnumMarketDetailViewType type;//控件类型
@property (nonatomic, strong,readonly)SEGMarketDetailViewModel *data;
- (instancetype)initWithData:(SEGMarketDetailViewModel *)data type:(SEGEnumMarketDetailViewType)type;
-(void)segMarketDetailViewLayout;

@property (nonatomic, assign) CGFloat titleLabelHeight;//titleLabel 高度
@property (nonatomic, strong) SEGTextLayout *titleLabelTextLayout;//titleLabel 富文本布局

@property (nonatomic, assign) CGFloat contentLabelHeight;//contentLabel 高度
@property (nonatomic, strong) SEGTextLayout *contentLabelTextLayout;//contentLabel 富文本布局

@property (nonatomic, assign) CGFloat priceLabelHeight;//priceLabel 高度
@property (nonatomic, assign) CGFloat priceLabelWidth;//priceLabel 宽度
@property (nonatomic, strong) SEGTextLayout *priceLabelTextLayout;//priceLabel 富文本布局

@property (nonatomic, assign) CGFloat imageContentViewHeight;//imageContentView 高度

@end
